home *** CD-ROM | disk | FTP | other *** search
-
-
-
- Tcl_Return Tcl Command Language Library Tcl_Return
-
-
-
- _________________________________________________________________
-
- NNAAMMEE
- Tcl_Return - set up a Tcl result string
-
- SSYYNNOOPPSSIISS
- ##iinncclluuddee <<ttccll..hh>>
-
- TTccll__RReettuurrnn(_i_n_t_e_r_p, _s_t_r_i_n_g, _s_t_a_t_u_s)
-
- AARRGGUUMMEENNTTSS
- Tcl_Interp *_i_n_t_e_r_p(out)
- Interpreter for which a
- return value is to be
- established.
-
- char *_s_t_r_i_n_g (in) String value to be
- returned, or NNUULLLL.
-
- int _s_t_a_t_u_s (in) Indicates the nature of
- _s_t_r_i_n_g. Must be either
- TTCCLL__SSTTAATTIICC, TTCCLL__DDYYNNAAMMIICC,
- or TTCCLL__VVOOLLAATTIILLEE.
-
- _________________________________________________________________
-
-
- DDEESSCCRRIIPPTTIIOONN
- TTccll__RReettuurrnn is a convenience routine used by several of the
- Tcl commands. It arranges for _s_t_r_i_n_g to be the return
- string for the current Tcl command in _i_n_t_e_r_p. If _s_t_a_t_u_s is
- TTCCLL__SSTTAATTIICC it means that _s_t_r_i_n_g refers to an area of static
- storage that is guaranteed to remain untouched until at
- least the next call to TTccll__EEvvaall. If _s_t_a_t_u_s is TTCCLL__DDYYNNAAMMIICC
- it means that _s_t_r_i_n_g was allocated with a call to mmaalllloocc(())
- and is now the property of the Tcl system. TTccll__RReettuurrnn will
- arrange for the string's storage to be released by calling
- ffrreeee(()) when it is no longer needed. The third possibility
- is for _s_t_a_t_u_s to be TTCCLL__VVOOLLAATTIILLEE. This means that _s_t_r_i_n_g
- points to an area of memory that is likely to be overwritten
- when TTccll__RReettuurrnn returns. In this case TTccll__RReettuurrnn makes a
- copy of the string and arranges for the copy to be the
- return string for the current Tcl command.
-
- If _s_t_r_i_n_g is NNUULLLL, then _s_t_a_t_u_s is ignored and TTccll__RReettuurrnn
- re-initializes _i_n_t_e_r_p's result to point to the pre-allocated
- result area, with an empty string in the result area.
-
- In any of the above cases, if _i_n_t_e_r_p holds a dynamically-
- allocated result at the time of the TTccll__RReettuurrnn call, the old
- result's storage is released by calling ffrreeee(()).
-
-
-
-
-
-
- Sprite v.1.0 Printed: April 26, 1990 1
-
-
-
-
-
-
- Tcl_Return Tcl Command Language Library Tcl_Return
-
-
-
- KKEEYYWWOORRDDSS
- command, result, return value, interpreter
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Sprite v.1.0 Printed: April 26, 1990 2
-
-
-
-